Package docx4j.bookmark

Source Code of docx4j.bookmark.AsposeBookmarksDelete

package docx4j.bookmark;

import com.aspose.words.Bookmark;
import com.aspose.words.Document;
import com.aspose.words.DocumentBuilder;
import com.aspose.words.SaveFormat;

public class AsposeBookmarksDelete
{
  // See more @ http://www.aspose.com/docs/display/wordsjava/Bookmarks+in+Aspose.Words
 
  public static void main(String[] args) throws Exception
  {
    Document doc = new Document("data/docx4j/Aspose_Bookmark.doc");

    // By name.
    Bookmark bookmark = doc.getRange().getBookmarks().get("AsposeBookmark");
    bookmark.remove();
   
    doc.save("data/docx4j/Aspose_BookmarkDeleted.doc", SaveFormat.DOC);
    System.out.println("Done.");
  }
}
TOP

Related Classes of docx4j.bookmark.AsposeBookmarksDelete

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.